package com.qmds.patrolserver.plan.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qmds.common.core.entity.Patrol;
import com.qmds.patrolserver.plan.params.PatrolNum;
import com.qmds.patrolserver.plan.vo.PatrolVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * (Patrol)表数据库访问层
 *
 * @author makejava
 * @since 2024-09-09 16:41:11
 */
public interface PatrolDao extends BaseMapper<Patrol> {

    Page<PatrolVo> selectAllInfo(Page<PatrolVo> page, @Param(Constants.WRAPPER) QueryWrapper<PatrolVo> queryWrapper);

    @Select("select plan_type,count(id) as plan_num from patrol group by plan_type")
    List<PatrolNum> selectNum();
}

